package com.syg.servlet08_getRespHTML;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;

@WebServlet("/getHtml")
public class _05_GetHTMLDemo extends HttpServlet{
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        _01_ServletResponseProxy proxy = new _01_ServletResponseProxy(resp);
        OutputStream os = proxy.getOutputStream();
        os.write("hello".getBytes());
        String htmlStr = _04_HtmlBuffer.getStr();
    }
}
